Skip to content

Conversation

gjcairo
Copy link
Collaborator

@gjcairo gjcairo commented Jan 17, 2025

This new module adds conformances to the Service protocol from grpc-swift-service-lifecycle to GRPCClient and GRPCServer so that they compose nicely with ServiceLifecycle.

Note: depends on grpc/grpc-swift#2166

@gjcairo gjcairo added the 🆕 semver/minor Adds new public API. label Jan 17, 2025
@gjcairo gjcairo requested a review from glbrntt January 17, 2025 17:20
@gjcairo gjcairo marked this pull request as ready for review January 17, 2025 17:29
Copy link
Collaborator

@glbrntt glbrntt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, just two nits

public import GRPCCore
public import ServiceLifecycle

extension GRPCClient: @retroactive Service {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can you drop a comment in why @retroactive is okay here? (and for the server)


// Retroactive conformances of gRPC client and server to swift-server-lifecycle's Service.
.target(
name: "GRPCServiceLifecycle",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be great if you could add a documentation bundle for this too (and update .spi.yml). That can be a follow up though if you prefer.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, looks like none of the modules other than the Health service actually have a doc bundle so maybe we should do that separately for all?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me

@glbrntt glbrntt merged commit 0eb173d into grpc:main Jan 20, 2025
21 checks passed
@gjcairo gjcairo deleted the service-lifecycle branch January 20, 2025 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🆕 semver/minor Adds new public API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants